home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
PROGEDIT
/
3458A.ZIP
/
AMAC44A.ZIP
/
BOK001.QM
< prev
next >
Wrap
Text File
|
1992-06-22
|
44KB
|
814 lines
* bok001.qm
* Macros To Jump to and Load Macros Across Files
* Written By Tom Hogshead
* [ See BOOKxx.QM For Use ]
* 6/22/92
* Key Subfile Description
* ===== ============ ==================================================
* @f - Jump To and Read Macros Across Files ( ) |chg
* @p - Decrypt @f
*
* @6 - Read/Load Txtfile from Index |chg
* @7 - Read Macros from Index, Txtfile Not Loaded |chg
*
* @8 - Read/Load Macros at Cursor Line Across Files |chg
* @9 - Read Macros at Cursor Line, Txtfile Not Loaded |chg
*
* @eq @= - Read Current Txtfile's Macros
*
* @7 {e:\up\fil001} - Load File Name at Cursor That Is or Is Not
* Enclosed with Any Single Characters
* or Followed by any Single Trailing Character
*
* {e:\up\BOOK*} - Return to BOOKxx.QM
*
* Decrypt @f - How to
* Run, How to run @f
* Index Modification and Additions
*
*-- eoi
* M A C R O S
* ----------------------------------------------------------------------
* @(6) Select Txtfile To Load And Read Macros From Index
* ----------------------------------------------------------------------
* This macro enables the user to select a txtfile, load the selected
* txtfile, and read the selected txtfiles' macros, from files listed in
* INDXxx.QM. To run, press @6, cursordown to the desired line in
* INDXxx.QM, and press <enter>. If the Index subfile selected itself
* has subfile(s), the user may select the desired subfile at the next
* pause by placing the cursor on the desired line and pressing <enter>.
* The macro ends with the final selected txtfile loaded and it's macros
* read.
* Add the two closewindow lines at end of macro if QConfig is
* configured to not close window on quit.
* w Key in starting file if NO subfile selected
* y Key in starting file if subfile selected
* y Subfile prefix of index selection
* z Subfile prefix if index selection is macro file , ',qm' extension
@6 macrobegin
setscreenoff
* -------------------- Load INDX*.QM In Ring --------------------*
onewindow unmarkblock * Close all windows
dropanchor dropanchor * Mark starting file to return to *|1
editfile * Load INDX*.QM
*************************************
"e:\up\" * Change "e:\up\" to your directory *
*************************************
"INDX*.QM" *
return *
quit * Quit INDX* if loaded to ensure
* correct Pos in ring
gotoblockend * Return to starting point *|1
editfile return * Load INDX*.QM as next file in ring
*-- from @5 May 30, 1992
START:
* SETSCREENOFF *|4
defaultwordset onewindow begfile
endline unmarkblock dropanchor
storescrbuff "w" return * Clear buffers
storescrbuff "x" return
storescrbuff "y" return
storescrbuff "z" return
unmarkblock markline markline * Highlight line 1
FIND "(" return delline return * Pos on first macro
makectrofscreen
begline cursorright * Pos for visibilty
SETSCREENON pause SETSCREENOFF * Pause for selection
unmarkblock begline markline
Find "{" return "L" return * Test if selection has subfile
jtrue SUBFILE * If "{" found, macro is in subfile
* ---------- Jump to Index Selection If In Current File ----------*
wordright markword
storescrbuff "w" return copy * Store/Copy key
endpara * Bypass Index
Find
"(" paste ")" return "I" return * Jump to key in this file
jfalse NOMARK
maketopofscreen
scrollup begline * Pos cursor line 2 tof
* ------------------------ NUL Control 1 ------------------------*
horizontalwindow
editfile "NUL" return * Load NUL window 2
prevwindow * Starting file window 1
jump END1 * Test if file has macros
* NOMARK: begfile * If no key found, go to bof
NOMARK: QUIT * Quit INDX if no key/subfil *|1
jump END3 * And end macro
* ---------- Determine if Index Selection Is In Subfile ----------*
SUBFILE:
wordleft markword * Mark subfile key *|2
storescrbuff "x" return * Store key in buff x
wordright * Return to first char of subf nam *|3
unmarkblock markcharacter
Find "}" return delline return * Mark subfile prefix
storescrbuff "y" return copy * Store/copy subfile prefix
QUIT * Quit INDX* and selected subfile *|1
* ------------------------- Load Subfile -------------------------*
prevfile * Will return us to starting file :20
horizontalwindow
editfile paste ".qm" return * Load subfile window 2
* ------------------------ NUL Control 2 ------------------------*
NEXT:
horizontalwindow
editfile "NUL" return * Load NUL window 3
getscrbuff "x" return cut * Cut key to scrap
* --------------- Find Index Selection In Subfile ---------------*
prevwindow begfile endpara * Window subfile, Bypass Index
Find
"(" paste ")" return "I" return * Find key in subfile
jfalse START * In case subfile has keys
maketopofscreen
scrollup begline * Pos cursor line 2 tof
* -------------- Determine if File Contains Macros --------------*
END1:
FindReplace #254 return * Initialize FindReplace
currentfilename return escape * w/currentfilename
nextwindow
endfile addline cursorright * Window Nul
dropanchor #254 begline * Insert dummy char
FindReplace return return
"N" return * Replace dummy w/file name
Find
".qm" return delline return * Test if file has macros
jtrue END2 * Read macros if txtfile
* --------- Quit NUL, Initialize Find for F4 RepeatFind ---------*
getscrbuff "w" return cut *ELSE Cut key to scrap
Find
"(" paste ")" return escape * Initialize for F4 repeatfind
quit zoomwindow * Quit NUL, close window if
* closewindow * Add if QConfig set to NOT close
* window on quit
jump END3 * End macro
END2:
storescrbuff "z" return * Store file prefix
getscrbuff "w" return cut * Cut key to scrap
Find
"(" paste ")" return escape * Initialize for F4 repeatfind
getscrbuff "z" return cut * Cut file prefix to scrap
quit zoomwindow * Quit NUL, close window if set to
* closewindow * Add if QConfig set to NOT close
* window on quit
* ------------------------- Read Macros -------------------------*
SETSCREENON * In case macfile does not exist,
* must be able to see dialog boxes
macroread paste "mac" return * Read current txtfile macros
END3:
*
* 198 bytes Mon 07-29-1991 10:24:51 (TH @6, Initial in AMAC39A)
* 298 bytes Fri 08-02-1991 14:59:35 (TH @6, added macrowrite)
* 304 bytes Mon 04-06-1992 08:48:40 (TH @6, added setscreenoff/on)
* (In Amac43.zip)
* 302 bytes Sun 05-31-1992 09:18:50 (TH @6, used @f algorithm,
* removed macrowrites *|1)
* 287 bytes Wed 06-03-1992 13:54:50 (TH @6, changed key mark *|2)
* 286 bytes Wed 06-03-1992 21:40:18 (TH @6, shortened *|3)
* 285 bytes Thu 06-04-1992 09:17:53 (TH @6, removed setscreenoff *|4 )
* 284 bytes Thu 06-04-1992 09:47:25 (TH @6, removed prevfile *|5)
* 285 bytes Sat 06-20-1992 13:13:17 (TH @6, addded prevfile *:20)
*
* ----------------------------------------------------------------------
* @(7) Select And Read Macros From Index, Txtfile Not Loaded
* ----------------------------------------------------------------------
* This macro enables the user to select and read a txtfiles' macros
* from files listed in INDXxx.QM, and return to the file in which @7
* was invoked with the newly loaded macros. The txtfile of macros
* selected is NOT loaded. To run, press @7, cursordown to the desired
* line in INDXxx.QM, and press <enter>. If the subfile selected itself
* has subfile(s), the user may select the desired subfile at the next
* pause by placing the cursor on the desired line and pressing <enter>.
* The macro ends with the file loaded in which @7 was invoked, and the
* selected macros read and loaded.
* Add the two closewindow lines at end of macro if QConfig is
* configured to not close window on quit.
@7 macrobegin
setscreenoff
* -------- Clear Scratch Buffers, Position Files In Ring --------*
onewindow * Close all windows
defaultwordset * In case altwordset on
endline * Pos on empty space
unmarkblock dropanchor * Mark starting file to clear scratch
* buffers and return to after "quit"
storescrbuff "x" return * Clear buff x
editfile * Load INDX*.QM
*************************************
"e:\up\" * Change "e:\up\" to your directory *
*************************************
"INDX*.QM" *
return *
quit * Quit INDX*.QM if loaded to ensure
* correct Pos in ring
gotoblockend * Return to starting point *|1
* ------------------------ INDX Selection ------------------------*
editfile return * Load INDX as next file in ring
begfile * Go to file begin
markline markline * Highlight line 1
FIND "{" return delline return * Find first Index selection line
makectrofscreen * Show top of file
begline * Pos for selection
cursorright * Pos for visibilty
setscreenon
pause * Pause for Index selection
setscreenoff
unmarkblock * Unmark line 1
markline * Mark selected line
FIND "(" return "L" return * Test if selection has key
jfalse NOKEY * If no key, must be subfile selec
cursorright *ELSE put cursor on key
markword * Mark key
storescrbuff "x" return * Store key to buff x
NOKEY: *
begline * For Find
markline * Markline for Find
Find "{" return "L" return * Move cursor to subfile lft brace
jtrue SELECT * If no subfile, quit and end
quit * Quit INDX
jump END * End macro
SELECT:
cursorright * Move to first letter of subfile
unmarkblock * Unmark
markcharacter * Begin character block
Find "}" return delline return * Mark subfile prefix
copy * Copy subfile prefix to scrap
quit * Quit INDX11
* --------------------- Setup Subfile Window ---------------------*
horizontalwindow * Window 2
editfile escape * For all QConfig's
* ------------------------- NUL Control -------------------------*
horizontalwindow * Window 3
editfile "NUL" return * Load NUL in window 3
getscrbuff "x" return * Get INDX key from scratch
endline * Test if INDX selection had key
jtrue QUIT * If no key, go to QUIT
* ------------------- Subfile Index Selection -------------------*
prevwindow * Window 2 subfile
editfile paste ".qm" return * Load subfile window 2
begfile * Go to file begin
markline markline * Highlight line 1
FIND "{" return delline return * Test if selection has any subfiles
* If so, Pos cursor on first line
jfalse QUITNUL * If not, read current file macros
begline cursorright * Pos for selection
zoomwindow * Full window
makectrofscreen * Show top of file
setscreenon
pause * Pause for Index selection
setscreenoff
unmarkblock * Unmark line 1
markline * Mark selected line
Find return "L" return * Test if selection has subfile
jfalse QUITNUL * If not, read current file macros
cursorright * Move to first letter of subfile
unmarkblock * Unmark
markcharacter * Begin character block
Find "}" return delline return * Mark subfile prefix
copy * Copy subfile prefix to scrap
* --------------------------- Quit NUL ---------------------------*
QUITNUL:
quit * Quit subfile, closes window if
* QConfig set to close on quit
* closewindow * Add this line if QConfig set
* to NOT close window on quit
nextwindow * Window NUL
QUIT:
quit * Quit NUL, closes window if
* QConfig set to close on quit
* closewindow * Add this line if QConfig set
* to NOT close window on quit
* ------- Save Current Macro Buffer, Read Selected Macros -------*
READ: *
unmarkblock * Unmark line if marked
prevwindow * Return to starting file if
* any window still open
zoomwindow * Full subfile window if
* any window still open
*-- Load macro text file option, May 31, 1992
* editfile paste return * Load macro text file option *|1
setscreenon
macroread * Read subfile macros
paste * of subfile prefix
".mac" return * w/extension 'mac'
END: *
*
* 136 bytes Mon 07-29-1991 10:24:57 (TH @7, Initial in AMAC39A)
* 256 bytes Fri 08-02-1991 14:59:02 (TH @7, added macrowrite)
* 249 bytes Sat 08-03-1991 15:45:28 (TH @7, added macrowrite)
* 248 bytes Sun 08-04-1991 01:41:24 (TH @7, removed unmarkblock)
* (In Amac40.zip)
* 248 bytes Mon 08-05-1991 00:50:00 (TH @7, moved zoomwindow down)
* 248 bytes Mon 08-05-1991 14:24:16 (TH @7, moved makectrofscreen down)
* 254 bytes Mon 04-06-1992 08:49:08 (TH @7, added setscreenoff/on)
* (In Amac43.zip)
* 195 bytes Sun 05-31-1992 10:12:18 (TH @7 removed macrowrites,
* added load selection option,
* changed start *|1)
*
*
* ----------------------------------------------------------------------
* @(8) Jump From Cursor Line To Macro or Item Located Anywhere
* In Current File Or In A Designated Subfile, Read Macros
* ----------------------------------------------------------------------
* @8 is used to quickly jump from the cursor line, not the Index line
* like @f, to the desired item or macro either in the current file or
* in a subfile whose name appears in { } following the key or item in
* ( ). This is useful when the macro key and/or subfile name are on the
* cursor line. The user then does not have to select the desired macro
* or item from the Index, saving time. See @f for discussion because
* @8 is installed and used just like @f. For example, to locate @f
* place the cursor on the following line and invoke @8:
* @f Jump From Index Line To Macro (Example only)
@8 macrobegin
SETSCREENOFF
defaultwordset
jump BEGIN *|1
START:
onewindow
begfile
endline unmarkblock dropanchor
storescrbuff "w" return * Clear buffers
storescrbuff "x" return
storescrbuff "y" return
storescrbuff "z" return
unmarkblock markline markline * Highlight line 1
FIND "(" return delline return * Pos on first macro
makectrofscreen
begline cursorright * Pos for visibilty
SETSCREENON pause SETSCREENOFF * Pause for selection
BEGIN:
unmarkblock begline markline
Find "{" return "L" return * Test if selection has subfile
jtrue SUBFILE * If "{" found, macro is in subfile
* ---------- Jump to Index Selection If In Current File ----------*
INFILE: *ELSE, macro is in this file
wordright markword
storescrbuff "w" return copy * Store/Copy key
begfile *|1
endpara * Bypass Index
Find
"(" paste ")" return "I" return * Jump to key in this file
jfalse NOMARK
maketopofscreen
scrollup begline * Pos cursor line 2 tof
* ------------------------ NUL Control 1 ------------------------*
horizontalwindow
editfile "NUL" return * Load NUL window 2
prevwindow * Starting file window 1
jump END1 * Test if file has macros
NOMARK: begfile * If no key found, go to bof
jump END3 * And end macro
* --------- Get Subfile Key and Name to Scratch Buffers ---------*
SUBFILE:
wordleft markword * Mark subfile key if it exists
storescrbuff "x" return * Store key in buff x
wordright * Return to first char of subf nam
unmarkblock markcharacter
Find "}" return delline return * Mark subfile prefix
storescrbuff "y" return copy * Store/copy subfile prefix
* ------------------------- Load Subfile -------------------------*
horizontalwindow
editfile paste ".qm" return * Load subfile window 2
* ------------------------ NUL Control 2 ------------------------*
NEXT:
horizontalwindow
editfile "NUL" return * Load NUL window 3
getscrbuff "x" return cut * Cut key to scrap
* --------------- Find Index Selection In Subfile ---------------*
prevwindow begfile endpara * Window subfile, Bypass Index
Find
"(" paste ")" return "I" return * Find key in subfile
jfalse START * In case subfile has keys
maketopofscreen
scrollup begline * Pos cursor line 2 tof
* -------------- Determine if File Contains Macros --------------*
END1:
FindReplace #254 return * Initialize FindReplace
currentfilename return escape * w/currentfilename
nextwindow
endfile addline cursorright * Window Nul
dropanchor #254 begline * Insert dummy char
FindReplace return return
"N" return * Replace dummy w/file name
Find
".qm" return delline return * Test if file has macros
jtrue END2 * Read macros if txtfile
* --------- Quit NUL, Initialize Find for F4 RepeatFind ---------*
getscrbuff "w" return cut *ELSE Cut key to scrap
Find
"(" paste ")" return escape * Initialize for F4 repeatfind
quit zoomwindow * Quit NUL, close window if set to
* closewindow * Add if QConfig set to NOT close
* window on quit
jump END3 * End macro
END2:
storescrbuff "z" return * Store file prefix
getscrbuff "w" return cut * Cut key to scrap
Find
"(" paste ")" return escape * Initialize for F4 repeatfind
getscrbuff "z" return cut * Cut file prefix to scrap
quit zoomwindow * Quit NUL, close window if set to
* closewindow * Add if QConfig set to NOT close
* window on quit
* ------------------------- Read Macros -------------------------*
SETSCREENON * In case macfile does not exist,
* must be able to see dialog boxes
macroread paste "mac" return * Read current txtfile macros
END3:
*
* 215 bytes Sat 09-07-1991 18:19:08 (TH @9)
* 217 bytes Mon 04-06-1992 08:59:48 (TH @9 added setscreenoff/on)
* (In Amac43.zip)
* 159 bytes Sun 05-31-1992 19:04:15 (TH @9, removed macrowrites
* changed key @9 to @8)
* 155 bytes Wed 06-03-1992 22:39:53 (TH @8, *|f)
* 249 bytes Thu 06-04-1992 09:12:58 (TH @8), modified @5 for @8 *|1)
*
* ----------------------------------------------------------------------
* @(9) Read Macros of Subfile on Cursor Line, Txtfile Not Loaded
* ----------------------------------------------------------------------
* This macro enables the user to read macros of the subfile designated
* on the cursor line but not load it's txtfile. If the subfile on the
* cursor line itself has subfile(s), the user may select the desired
* subfile at the next pause by placing the cursor on the desired line
* and pressing <enter>. If the starting cursor line does not contain a
* designated subfile, the macro ends with the macro buffer unchanged
* and cursor on the starting line in col 1. In all cases, the txtfile
* of selected macro is NOT loaded and the user is returned to the file
* @8 was invoked from with selected macros loaded.
* Add the two closewindow lines at end of macro if QConfig is
* configured to not close window on quit.
@9 macrobegin
setscreenoff
* -------- Clear Scratch Buffers, Position Files In Ring --------*
onewindow * Close all windows
unmarkblock * Unmark any marked blocks
defaultwordset * In case altwordset on
endline * Pos on empty space
dropanchor * Mark starting file to clear scratch
* buffers and return to after "quit"
storescrbuff "1" return * Clear buff 1
begline * Pos for selection
markline * Mark selected line
find "(" return "L" return * Test if selection has key
jfalse NOKEY * If no key, must be subfile selec
cursorright *ELSE put cursor on key
markword * Mark key
storescrbuff "1" return * Store key to buff 1
NOKEY: *
begline * For Find
markline * Markline for Find
find "{" return "L" return * Move cursor to subfile lft brace
jtrue SELECT * If subfile, continue
unmarkblock *ELSE unmark line
jump END * And end macro, no macro to read
SELECT:
cursorright * Move to first letter of subfile
unmarkblock * Unmark
markcharacter * Begin character block
Find "}" return delline return * Mark subfile prefix
copy * Copy subfile prefix to scrap
begline * Col 1
* --------------------- Setup Subfile Window ---------------------*
horizontalwindow * Window 2
editfile escape * Needed for all QConfig's
* ------------------------- NUL Control -------------------------*
horizontalwindow * Window 3
editfile "NUL" return * Load NUL in window 3
getscrbuff "1" return * Get key from buff 1
endline * Test if selection had key
jtrue QUIT * If no key, go to QUIT
* ------------------- Subfile Index Selection -------------------*
prevwindow * Window 2 subfile
editfile paste ".qm" return * Load subfile window 2 to test if
* it has subfiles
begfile * Go to file begin
markline markline * Highlight line 1
* zoomwindow * Full window
FIND "{" return delline return * Test if selection has any subfiles
* If so, Pos cursor on first line
jfalse QUITNUL * If not, read current file macros
begline * Pos for selection
cursorright * Pos for visibilty
zoomwindow * Full window
makectrofscreen * To show top of file
setscreenon
pause * Pause for Index selection
setscreenoff
unmarkblock * Unmark line 1
markline * Mark selected line
Find return "L" return * Test if selection has subfile
jfalse QUITNUL * If not, read current file macros
cursorright * Move to first letter of subfile
unmarkblock * Unmark
markcharacter * Begin character block
Find "}" return delline return * Mark subfile prefix
copy * Copy subfile prefix to scrap
begline
* --------------------------- Quit NUL ---------------------------*
QUITNUL:
quit * Quit subfile, closes window if
* QConfig set to close on quit
* closewindow * Add this line if QConfig set
* to NOT close window on quit
nextwindow * Window NUL
QUIT:
quit * Quit NUL, closes window if
* QConfig set to close on quit
* closewindow * Add this line if QConfig set
* to NOT close window on quit
* ------- Save Current Macro Buffer, Read Selected Macros -------*
READ: *
prevwindow * Return to starting file
zoomwindow * Full subfile window
setscreenon
macroread * Read subfile macros
paste * of subfile prefix
".mac" return * w/extension 'mac'
END: *
*
* 198 bytes Sun 08-04-1991 01:53:24 (TH @8)
* 200 bytes Mon 08-05-1991 01:06:52 (TH @8, added missing endline)
* 204 bytes Mon 04-06-1992 08:49:38 (TH @8, added setscreenoff/on)
* (In Amac43.zip)
* 146 bytes Sun 05-31-1992 19:01:16 (TH @8, removed macrowrites,
* changed key @8 to @9 *|b)
*
* ----------------------------------------------------------------------
* @= Read Current Txtfile's Macros @(eq)ual
* ----------------------------------------------------------------------
* Installing this macro in QConfig.dat, enables the user to read the
* macros of the current file we are editing.
@= Macro_Begin MacroRead CurrentFilename Backspace Backspace "mac" Return
*
* 15 bytes Fri 09-14-1990 14:06:11 (TH @=, @8 in MACRxx.QM)
*
* ----------------------------------------------------------------------
* @(f) Jump From Index Line To Macro or Item Located Either
* In Document Below Or In A Designated Subfile
* ----------------------------------------------------------------------
* The first commented lines of this macro must be decrypted to run.
* See @p at the end of this file for decryption instructions.
* @f is used to quickly jump from Index line to the desired item
* or macro either in the document below or in a subfile whose
* name appears in { } following the key or item in ( ). @f uses
* a technique that is generally not recommended and rarely
* works, i.e. "having a macro read another macro". This is
* possible here because the macroread command is the last
* command in the macro. This macro requires QEdit and QMAC
* v2.15.
* @f provides the user with a means to quickly load any macro in
* an Index with just several keystrokes. The number of macros
* that can be accessed and run using this macro is theoretically
* unlimited; e.g., if no macro subfile of all those designated
* in the Index contains more than 10 macros and an Index with
* key and subfile contains a list of 1000 macros, each of these
* macros could be assigned @1 to @0 in each subfile, and we
* could access and run 1000 macros using only the keys @1 to @0
* from one Index with just several keystrokes. Another
* advantage using @f is that an addition or modification to a
* specific macro only modifies the subfile containing the macro
* and it's macfile, thereby reducing considerably the size of
* files needing backed up or uploaded when changes are made.
* The techniques used in @f become useful and/or necessary when
* the total size of macros in a file exceed the 2k limitation or
* when the number of macros in a file are greater than 40 and
* the user (like me!) prefers to use only the Alternate Number
* keys and "@^#" Function keys. The same macro key may be used
* for different macros in different subfiles in the same Index,
* allowing the convenient Alternate Number keys to be used for
* all macros in all subfiles, unless the number of macros in any
* subfile of an Index is greater than 10. In other words, we
* don't run out of keys!
* The user may wish to add or delete items from an (Index). An
* item or macro located in the same file as the Index, not in a
* subfile, must have the key or first word enclosed with
* parentheses ( ), and an item or macro located in another file
* (referred to as "subfile") must have the subfile prefix
* enclosed with braces { } following the macro key, as follows:
* INDEX
* ============================================================
* ( Key ) { Subfile } ........... Description ............
* All subfile suffix's must be "QM", and all macfile suffix's
* must be "MAC". If the designated subfile does not have a
* corresponding macfile, the selected item will be found in the
* subfile anyhow, and an error message will be displayed
* advising "File Not Found" meaning the subfile does not have a
* corresponding macfile. Escape removes the message and shows
* the name of the non-existent subfile macfile. Escape again
* returns us to normal editing of the subfile with the same
* macro buffer as before @f was executed - no problems.
* If the selected key or first word on the selected Index line
* does not exist enclosed by ( ) anywhere in the document (or in
* the subfile if designated), the cursor returns to the
* beginning of the file.
* At the pause, @f positions the cursor line on the first left
* parentheis. If the key (or first word) in the index line is not
* enclosed with a ( ), which it does need to, you may want to insert a
* ( ) at the end of the first index line.
* If your QConfig is set to NOT close windows on quit, add the
* lines 'closewindow' commented out in @f.
* To (Run) @f
* -----------
* 1. Press Alt and f at the same time. Line 1 is marked to highlight.
* Cursor down to desired line in Index.
* 2. Press Enter. The macro then locates and jumps to the item
* selected on the cursor line. If the item or macro is located in
* a designated subfile, @f loads the subfile containing the
* selected macro, and reads the subfile macros for running. The
* selected macro key and it's macro are found and shown in a full
* window for editing or viewing.
*
@f macrobegin
*--
* NOTE: The first lines of this macro must be decrypted to run. See
* @p at the end of this file and READ.ME for instructions.
*--
SETSCREENOFF *|1
defaultwordset *|
START:
*-- begin of encrypt
*ö°ùÅÜÇùéüεö⌠Åâ≡ÇÄÅöτùé±ÇùÅöÉù∩φäÆ⌠ÄüΘÆöΦäü·ñùΘåüäöà÷üäÅàΘäÿßëëö"ε"
*öïÅ÷ßäùöà÷üäÅàΘäÿßëëö"æ"öïÅ÷ßäùöà÷üäÅàΘäÿßëëö"Σ"öïÅ÷ßäùöà÷üäÅàΘäÿßëë
*ö"Ñ"öïÅ÷ßäùöÉù∩φäÆ⌠ÄüΘÆö≤φäƱÇùÅö≤φäƱÇùÅö≡Çùéö"("öïÅ÷ßäùöΦÅıÇùÅ
*öïÅ÷ßäùö≤φÆŵ÷ä°ëàΘäÅÅùö⌠Åâ±ÇùÅöµßäÖüäïÇâå÷
*-- end of encrypt
BEGIN:
unmarkblock begline markline
Find "{" return "L" return * Test if selection has subfile
jtrue SUBFILE * If "{" found, macro is in subfile
* ---------- Jump to Index Selection If In Current File ----------*
INFILE: *ELSE, macro is in this file
wordright markword
storescrbuff "w" return copy * Store/Copy key
endpara * Bypass Index
Find
"(" paste ")" return "I" return * Jump to key in this file
jfalse NOMARK
maketopofscreen
scrollup begline * Pos cursor line 2 tof
* ------------------------ NUL Control 1 ------------------------*
horizontalwindow
editfile "NUL" return * Load NUL window 2
prevwindow * Starting file window 1
jump END1 * Test if file has macros
NOMARK: begfile * If no key found, go to bof
jump END3 * And end macro
* --------- Get Subfile Key and Name to Scratch Buffers ---------*
*
* SUBFILE: begline wordright markword * Mark subfile key
* jfalse NEXT * Bypass buffers if no word to mark
SUBFILE:
wordleft markword * Mark subfile key if it exists *|1
* If it does not, use fictitous blk
storescrbuff "x" return * Store key in buff x
wordright * Return to first char of subf nam *|1
*-- (removed June 3, 1992)
* markline begline
* Find "{" return "L" return * Test if selection has subfile
* jfalse NEXT * Bypass buffers if no subfile
* cursorright
unmarkblock markcharacter
Find "}" return delline return * Mark subfile prefix
storescrbuff "y" return copy * Store/copy subfile prefix
* ------------------------- Load Subfile -------------------------*
prevfile * Will return us to starting file*:20
horizontalwindow
editfile paste ".qm" return * Load subfile window 2
* ------------------------ NUL Control 2 ------------------------*
NEXT:
horizontalwindow
editfile "NUL" return * Load NUL window 3
getscrbuff "x" return cut * Cut key to scrap
* --------------- Find Index Selection In Subfile ---------------*
prevwindow begfile endpara * Window subfile, Bypass Index
Find
"(" paste ")" return "I" return * Find key in subfile
jfalse START * In case subfile has keys
maketopofscreen
scrollup begline * Pos cursor line 2 tof
* -------------- Determine if File Contains Macros --------------*
END1:
FindReplace #254 return * Initialize FindReplace
currentfilename return escape * w/currentfilename
nextwindow
endfile addline cursorright * Window Nul
dropanchor #254 begline * Insert dummy char
FindReplace return return
"N" return * Replace dummy w/file name
Find
".qm" return delline return * Test if file has macros
jtrue END2 * Read macros if txtfile
* --------- Quit NUL, Initialize Find for F4 RepeatFind ---------*
getscrbuff "w" return cut *ELSE Cut key to scrap
Find
"(" paste ")" return escape * Initialize for F4 repeatfind
quit zoomwindow * Quit NUL, close window if set to
* closewindow * Add if QConfig set to NOT close
* window on quit
jump END3 * End macro
END2:
storescrbuff "z" return * Store file prefix
getscrbuff "w" return cut * Cut key to scrap
Find
"(" paste ")" return escape * Initialize for F4 repeatfind
getscrbuff "z" return cut * Cut file prefix to scrap
quit zoomwindow * Quit NUL, close window if set to
* closewindow * Add if QConfig set to NOT close
* window on quit
* ------------------------- Read Macros -------------------------*
SETSCREENON * In case macfile does not exist,
* must be able to see dialog boxes
macroread paste "mac" return * Read current txtfile macros
END3:
*
* 196 bytes Fri 10-18-1991 11:04:25 (TH @f, decrypted)
* 166 bytes Fri 10-18-1991 11:08:08 (TH @f, encrypted, in AMAC41.ZIP)
* 265 bytes Mon 02-17-1992 17:22:15 (TH @f, decrypted)
* 227 bytes Mon 02-17-1992 17:21:20 (TH @f, encrypted, in AMAC42.ZIP)
* 261 bytes Mon 04-27-1992 10:11:28 (TH @f, decrypted *|c)
* 220 bytes Mon 05-04-1992 21:44:37 (TH @f, encrypted *|c)
* (In Amac43.zip)
* 245 bytes Thu 06-04-1992 09:21:54 (TH @f, changed key mark *|1)
* 246 bytes Sat 06-20-1992 13:15:15 (TH @f, added prevfile *:20)
*
* -------------------------
* @(p) (Decrypt) Macro @f
* -------------------------
* I'll be happy to send you the Password to decrypt @f if you
* will send me $15.00 (or any amount) in a self addressed stamped
* envelope. If you don't have $15.00 or don't think these macros are
* worth it, I'll still be glad to send you the Password. Just send
* me a self addressed stamped envelope anyhow! If you would rather
* not lick two stamps, use and enjoy the other 400+ non-encrypted
* macros in AMACxx.zip. My address is:
* T & T Enterprises
* PO Box 10786
* Greensboro, NC 27404
* I hope you find some of these macros useful. If you are a
* serious QEdit user, I think you will. Thanks for using Amac.
* NOTE: To decrypt @f, password for AMAC44.ZIP must be used.
@p Macro_Begin OneWindow GotoBlockBeg JTrue Label0: MarkLine
GotoBlockBeg JTrue Label1: Pause MarkLine Label0: Label1:
GotoBlockEnd SetRmargin Return ToggleWordWrap EndLine #173
BegLine GotoBlockBeg UnmarkBlock EndLine BegLine JTrue
Label2: NextPara Label2: Label13: MarkColumn EditFile "nul"
Return Quit GotoBlockBeg HorizontalWindow EditFile Return "A"
"BCDEFGHIJKLMNOPQRSTUVWXYZ" DupLine MarkLine Lower UnmarkBlock
CursorUp CursorRight JoinLine ShiftRight CursorUp "152436097"
"8" AddLine BegLine CursorRight "Ωφ∩Θñ⌠µΦτ≡ô⌡≈σ∙±≤≥°δìïàòÉîÜ¢£"
"¥₧ƒáíóúαêèöÿéÅëâåÇçÆÄùü·ûäÖ÷ßΓεæΣÑ" EndFile AddLine BegLine
Pause Label5: CursorLeft JFalse Label3: UnmarkBlock
MarkColumn Cut Find Paste Return "G" Return JFalse Label4:
DelCh BegLine CursorRight Paste EndFile Jump Label5: Label3:
DelLine PrevWindow Label11: MarkColumn Copy NextWindow
Label9: BegFile Find Paste Return DelLine Return JFalse
Label6: CursorDown JTrue Label7: CursorUp Label7: MarkColumn
Copy Label6: PrevWindow MakeCtrOfScreen PasteOver UnmarkBlock
CursorRight EndLine JFalse Label8: PrevPosition MarkColumn
Copy NextWindow Jump Label9: Label8: Find #173 Return "B"
Return JTrue Label10: BegLine CursorDown Label12: EndLine
BegLine JTrue Label11: NextPara Jump Label12: NextWindow Quit
CloseWindow Jump Label13: Label10: DelCh BegLine CursorDown
NextWindow Label4: Quit CloseWindow SetRmargin Return
*
* 356 bytes Mon 08-26-1991 02:51:27 (TH @p)